import request from '@/utils/request'

export function getProcessListO(listQuery) {
    return request({
      url: '/borrow/getShzBorrowList',
      method: 'post',
      data: {
        dataName: listQuery.username,
        dataType: listQuery.type
      },
      params: {
        pageNum: listQuery.page,
        pageSize: listQuery.limit
      }
    })
  }
  

  export function getProcessListT(listQuery) {
    return request({
      url: '/borrow/getYshBorrowList',
      method: 'post',
      data: {
        dataName: listQuery.username,
        dataType: listQuery.type
      },
      params: {
        pageNum: listQuery.page,
        pageSize: listQuery.limit
      }
    })
  }

  export function getProcessListTH(listQuery) {
    return request({
      url: '/getGProcessInfo',
      method: 'post',
      data: {
        dataName: listQuery.username,
        dataType: listQuery.type
      },
      params: {
        pageNum: listQuery.page,
        pageSize: listQuery.limit
      }
    })
  }

  export function getProcessListF(listQuery) {
    return request({
      url: '/getAlllProcessInfo',
      method: 'post',
      data: {
        dataName: listQuery.username,
        dataType: listQuery.type
      },
      params: {
        pageNum: listQuery.page,
        pageSize: listQuery.limit
      }
    })
  }

  export function fetchPerson(id) {
    return request({
      url: '/getPersonInfo',
      method: 'post',
      params: {id:id}
    })
  }

  export function  fetchToDo(status) {
    return request({
      url: '/getPersonInfo',
      method: 'post',
      data: {status:status}
    })
  }

  export function deletBorrowByID(id) {
    return request({
      url: '/borrow/deletBorrowByID/' + id,
      method: 'delete'
    })
  }
  export function updateBorrow(id) {
    return request({
      url: '/borrow/updateBorrow',
      method: 'post',
      params: {id:id}
    })
  }
  